
import Vue from 'vue'
import Router from 'vue-router'

// 路由懒加载的两种方式,加快首页的响应速度
// import Header from '../components/header/head.vue'
// const Header = resolve=> require(['../components/header/head.vue'],resolve);
const Recommend = resolve => System.import('../components/recommend/recommend.vue');
const Singer = resolve => System.import('../components/singer/singer.vue');
const Rank = resolve => System.import('../components/rank/rank.vue');

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: 'recommend'
    },
    {
      path: '/recommend',
      name: 'recommend',
      component: Recommend
    },
    {
      path: '/singer',
      name: 'singer',
      component: Singer
    },
    {
      path: '/rank',
      name: 'rank',
      component: Rank
    }
  ]
})
